import DemoHome from './containers/home/index.vue'
import DemoAbout from './containers/DemoAbout.vue'
import DemoContact from './containers/DemoContact.vue'
import MessageItem from './containers/MessageItem.vue'
import App from './containers/App.vue'
import Home1 from './containers/home/Home1.vue'
import Home2 from './containers/home/Home2.vue'

export const routes = {
    mode: 'hash',
    routes: [
        {path: '/home', component: DemoHome,children: [
                {
                    // 当 /user/:id/profile 匹配成功，
                    // UserProfile 会被渲染在 User 的 <router-view> 中
                    path: '/home/home11',
                    component: Home1
                },
                {
                    // 当 /user/:id/posts 匹配成功
                    // UserPosts 会被渲染在 User 的 <router-view> 中
                    path: '/home/home22',
                    component: Home2
                },
                {path:'/home',redirect:'/home/home11'}
            ]},
        {path: '/about', component: DemoAbout},
        {path: '/contact', component: DemoContact},
        {path: '/messageItem', component: MessageItem},
        {path:'*',redirect:'/home'}
    ]
}
